package zl.service.impl;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import zl.bean.Admin;
import zl.mapper.AdminMapper;
import zl.service.LoginService;

@Service
public class LoginServiceImpl implements LoginService {
    @Autowired
    private  AdminMapper adminMapper;

    @Override
    public Admin selectUser(String username, String password) {
        Admin admin = adminMapper.selectByUsername(username);
        if(admin.getPassword().equals(password)){
            return adminMapper.selectByUsername(username);
        }
        return null;
    }
}
